package com.coding.basic;

public class BinaryTreeNode implements Comparable {
	
	private Object data;
	private BinaryTreeNode left;
	private BinaryTreeNode right;
	
	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public BinaryTreeNode getLeft() {
		return left;
	}

	public void setLeft(BinaryTreeNode left) {
		this.left = left;
	}

	public BinaryTreeNode getRight() {
		return right;
	}

	public void setRight(BinaryTreeNode right) {
		this.right = right;
	}
	
	public BinaryTreeNode insert(Object o){
		return  null;
	}

	public int compareTo(Object obj) {
		if (obj == null || obj.getClass() != Integer.class) throw new IllegalArgumentException();
		return Integer.compare(((Integer) data).intValue(), ((Integer) obj).intValue());
	}
}
